home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global photopath, packagenum, photodatanum, photodatalist, photocounter, autostatus, fileName, colordep, wherefrom
- set photodatanum to photodatanum(packagenum)
- set photodatalist to photodatalist(photodatanum, packagenum)
- set photocounter to 0
- set autostatus to 0
- set wherefrom to fileName
- set fileName to "PHOTO"
- when mouseUp then set the visibility of sprite 23 = TRUE
- end
-
- on photodatanum packagenum
- set m to "11,8,8,7,8,13,9,12,13,11,12,8,12,13"
- set photodatanum to value(item value(packagenum) of m)
- return photodatanum
- end
-
- on photodatalist photodatanum, packagenum
- global colordep
- if colordep = 8 then
- set colordigit to "M"
- else
- if colordep = 16 then
- set colordigit to "F"
- end if
- end if
- if value(packagenum) <= 9 then
- set packagenum to "0" & string(packagenum)
- else
- set packagenum to string(packagenum)
- end if
- repeat with n = 1 to photodatanum
- if n <= 9 then
- put packagenum & "0" & n & colordigit & RETURN after photodatalist
- next repeat
- end if
- put packagenum & n & colordigit & RETURN after photodatalist
- end repeat
- return photodatalist
- end
-
- on getfilecounter nextprev
- global photodatanum, photodatalist, photocounter, getphotoname, photopalette, nextprevtransition
- set nextprevtransition to value(nextprev)
- set photocounter to value(nextprev) + photocounter
- if photocounter = 0 then
- set photocounter to photodatanum
- end if
- if photocounter > photodatanum then
- set photocounter to 1
- end if
- set getphotoname to line photocounter of photodatalist
- set photopalette to "PL" & char 1 to 4 of getphotoname
- end
-
- on setpalette palettename
- end
-
- on getphoto getphotoname
- global photopath, zoomcounter
- set zoomcounter to 0
- put photopath & getphotoname
- set myphoto to fileio(mnew, "read", photopath & getphotoname & ".PIC")
- if not objectp(myphoto) then
- exit
- end if
- set the picture of cast "Photo1" to myphoto(mreadpict)
- myphoto(mdispose)
- end
-
- on settransition
- global nextprevtransition, cursorwait
- cursor(cursorwait)
- if nextprevtransition = 1 then
- puppetTransition(2, 3, 4)
- else
- if nextprevtransition = -1 then
- puppetTransition(1, 3, 5)
- end if
- end if
- end
-
- on button
- set lposition to the left of sprite clickOn()
- set tposition to the top of sprite clickOn()
- set mh to mouseH()
- set mv to mouseV()
- if (mv >= (tposition + 22)) and (mv <= (tposition + 35)) then
- if (mh >= (lposition + 8)) and (mh <= (lposition + 63)) then
- nothing()
- else
- if (mh >= (lposition + 127)) and (mh <= (lposition + 153)) then
- nothing()
- else
- return 0
- end if
- end if
- else
- return 0
- end if
- set buttonname to EMPTY
- repeat while stillDown()
- if rollOver(clickOn()) then
- set mh to mouseH()
- set mv to mouseV()
- if (mv >= (tposition + 22)) and (mv <= (tposition + 35)) then
- if (mh >= (lposition + 8)) and (mh <= (lposition + 35)) then
- set buttonname to "Prev"
- else
- if (mh >= (lposition + 36)) and (mh <= (lposition + 63)) then
- set buttonname to "Next"
- else
- if (mh >= (lposition + 127)) and (mh <= (lposition + 153)) then
- set buttonname to "return"
- else
- set buttonname to EMPTY
- exit repeat
- end if
- end if
- end if
- else
- set buttonname to EMPTY
- exit repeat
- end if
- placedownbutton(buttonname, lposition + 8, tposition + 23)
- end if
- end repeat
- erasedownbutton()
- if rollOver(clickOn()) then
- return buttonname
- end if
- return 0
- end
-
- on placedownbutton buttonname, h, v
- puppetSprite(22, 1)
- set the type of sprite 22 to 1
- set the ink of sprite 22 to 0
- set the foreColor of sprite 22 to 255
- set the backColor of sprite 22 to 0
- set the castNum of sprite 22 to the number of member buttonname
- set the locH of sprite 22 to h
- set the locV of sprite 22 to v
- updateStage()
- end
-
- on erasedownbutton
- puppetSprite(22, 0)
- updateStage()
- end
-
- on zoomcont
- global zoomcounter, offseth, offsetv, cursorwait
- cursor(cursorwait)
- set mh to mouseH()
- set mv to mouseV()
- if zoomcounter = 0 then
- puppetSprite(10, 1)
- set the stretch of sprite 10 to 1
- set offseth to -320 + ((320 - mh) * 2)
- set offsetv to -240 + ((240 - mv) * 2)
- set left to 0
- set top to 0
- set right to 1280
- set bottom to 960
- spriteBox(10, left + offseth, top + offsetv, right + offseth, bottom + offsetv)
- puppetTransition(47, 1, 5)
- updateStage()
- set zoomcounter to 1
- else
- if zoomcounter = 1 then
- puppetTransition(48, 1, 5)
- spriteBox(10, 0, 0, 640, 480)
- set the stretch of sprite 10 to 0
- puppetSprite(10, 0)
- updateStage()
- set zoomcounter to 0
- end if
- end if
- end
-
- on returnmovie
- global packagenum, wherefrom
- puppetSprite(10, 0)
- play frame "Return"
- if wherefrom = "TITLE" then
- go(1, "TITLE")
- else
- go(1, "MOVIE" & packagenum)
- end if
- end
-
- on idle
- global startTime, fileName
- checktimeout()
- if fileName = "MAIN" then
- exit
- end if
- set runningtime to ticks() - startTime
- if runningtime > (10 * 60 * 60) then
- set startTime to ticks()
- if random(10) = 5 then
- bomb()
- end if
- end if
- end
-